

#ifndef STUDENT_H
#define STUDENT_H


#include <string>
#include "../util/MyArray.h"
/*************************************************
  * 描述：
  * 学生基类
  * File：MyArray.h
  * Author：name@mozihealthcare.cn
  * Date：2025-07-18
  * Update：
  * ************************************************/
class Student {
protected:
    int m_id;
    string m_name;
public:
    Student();
    Student(int id,string name);
    virtual ~Student()=default;
    void print() const;
    const string& getName() const;
    int getId() const;
    void setName(const string &name);
    void setId(int id);

    //显示子类的详细信息
    virtual void reflect();
    //序列化
    virtual string serialize() =0;
    //反序列化
    virtual void deserialize(const string &info)=0;
    virtual istream& readFrom(istream& in) = 0;
    friend istream& operator>>(istream &in,Student &s);
};


#endif //STUDENT_H
